package com.springboot.fwwb09.controller;


import com.springboot.fwwb09.entity.login;
import com.springboot.fwwb09.service.loginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("login")
@CrossOrigin
public class loginController {
    @Autowired
    private loginService loginService;

    //    查询所有的方法
    @GetMapping("findAll")
    public List<login> findAll() {
        List<login> login = loginService.findAll();
        return login;

    }

}
